	<!-- BEGIN PAGE -->
	<div class="page-content">
         <!-- BEGIN PAGE CONTAINER-->        
         <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->
			<div class="row-fluid">
				<div class="span12"> 
					<!-- BEGIN PAGE TITLE & BREADCRUMB-->			
					<h3 class="page-title">
						Semester <small>pengaturan semester</small>
					</h3>
					<ul class="breadcrumb">
						<li>
							<i class="icon-cogs"></i>
							Pengaturan Awal		
							<i class="icon-angle-right"></i>
						</li>
						<li>Semester</li>	
					</ul>
					<!-- END PAGE TITLE & BREADCRUMB-->
				</div>
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN PAGE CONTENT-->          
            <div class="row-fluid">
               <div class="span12">
					<!-- BEGIN SAMPLE TABLE PORTLET-->
                  <div class="portlet box blue">
                     <div class="portlet-title">
                        <div class="caption"><i class="icon-filter"></i>Penyaringan Data</div>
                     </div>
                     <div class="portlet-body flip-scroll">
						<form id="filter" action="" class="form-horizontal" method="post">
							<div class="control-group">
								<label class="control-label" >Departemen:</label>
								<div class="controls">
									<select class="span6 m-wrap" id="departemen" name="departemen" onchange='$("#filter").submit();'>
										<?php foreach($departemen->result_array() as $row){?>
										 <option value="<?php echo $row['departemen_id']?>" <?php echo $row['departemen_id'] == $departemen_id?'selected="selected"':'' ?>><?php echo $row['nama']?></option>
										<?php } ?>
									</select>
								</div>
							</div>
						 </form>
                     </div>
                  </div>
                  <!-- END SAMPLE TABLE PORTLET-->
                  <!-- BEGIN SAMPLE TABLE PORTLET-->
                  <div class="portlet box blue">
                     <div class="portlet-title">
                        <div class="caption"><i class="icon-cogs"></i>Data semester</div>
						<div class="tools">
                           <a href="<?php echo base_url()?>semester/form/<?php echo encode($departemen_id)?>" class="btn blue"><i class="icon-plus"></i> Tambah</a>
                        </div>
                     </div>
                     <div class="portlet-body flip-scroll">
                        <table class="table table-bordered table-striped table-condensed flip-content table-hover">
							<thead class="flip-content">
								<tr>
									<tr>
										<th align="center">Semester</th>
										<th align="center">Departemen</th>
										<th align="center">Aktif</th>
										<th align="center">Keterangan</th>
										<th align="center">Aksi</th>
									</tr>
								</tr>
							</thead>
                           <tbody>
								<?php
									foreach($semester->result_array() as $row){
										echo "<tr>";
										echo "<td>$row[semester]</td>";
										echo "<td>$row[nama]</td>";
										echo "<td>";
											if($row['aktif'] == 1)
												echo "<a class=\"btn mini green\"><i class=\"icon-ok\"></i> AKTIF</a>";
											else
												echo "<a class=\"btn mini red\"><i class='icon-remove'></i> NON-AKTIF</a>";
										echo "</td>";
										echo "<td>$row[keterangan]</td>";
									
										echo "<td align='center'>
										<a href=\"".base_url()."semester/form/".encode($row['departemen_id'])."/".encode($row['semester_id'])."\" title=\"Edit\" class=\"btn mini green\"><i class=\"icon-edit\"></i> Edit</a>
										<a href=\"".base_url()."semester/delete/".encode($row['departemen_id'])."/".encode($row['semester_id'])."\" title=\"Hapus\" class=\"btn mini red\" onClick=\"return confirm('Data akan dihapus. Lanjutkan ?')\"><i class=\"icon-trash\"></i> Hapus</a>
										</td>";
										echo "</tr>";
									}
									
									if($semester->num_rows() == 0){
										echo "<tr>";
										echo "<td colspan=5><div class=\"alert alert-error\">Tidak ada data semester untuk departemen yang dipilih. Klik tombol tambah untuk menambahkan data.</div></td>";
										echo "</tr>";
									}
								?>
                           </tbody>
                       </table>
                     </div>
                  </div>
                  <!-- END SAMPLE TABLE PORTLET-->
               </div>              
            </div>
           
            <!-- END PAGE CONTENT-->
         </div>
         <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->
	<?php $this->load->view('template/messages'); ?>